Optimal. Leaf size=89 \[ \frac {x}{(a+b)^2}-\frac {\sqrt {b} (3 a+b) \text {ArcTan}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{2 a^{3/2} (a+b)^2 d}+\frac {b \coth (c+d x)}{2 a (a+b) d \left (a+b \coth ^2(c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3742, 425, 536,
212, 211} \begin {gather*} -\frac {\sqrt {b} (3 a+b) \text {ArcTan}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{2 a^{3/2} d (a+b)^2}+\frac {b \coth (c+d x)}{2 a d (a+b) \left (a+b \coth ^2(c+d x)\right )}+\frac {x}{(a+b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 212
Rule 425
Rule 536
Rule 3742
Rubi steps
\begin {align*} \int \frac {1}{\left (a+b \coth ^2(c+d x)\right )^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\coth (c+d x)\right )}{d}\\ &=\frac {b \coth (c+d x)}{2 a (a+b) d \left (a+b \coth ^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {b-2 (a+b)+b x^2}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\coth (c+d x)\right )}{2 a (a+b) d}\\ &=\frac {b \coth (c+d x)}{2 a (a+b) d \left (a+b \coth ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\coth (c+d x)\right )}{(a+b)^2 d}+\frac {(b (3 a+b)) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\coth (c+d x)\right )}{2 a (a+b)^2 d}\\ &=\frac {x}{(a+b)^2}-\frac {\sqrt {b} (3 a+b) \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{2 a^{3/2} (a+b)^2 d}+\frac {b \coth (c+d x)}{2 a (a+b) d \left (a+b \coth ^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.43, size = 97, normalized size = 1.09 \begin {gather*} \frac {\frac {\sqrt {b} (3 a+b) \text {ArcTan}\left (\frac {\sqrt {b} \coth (c+d x)}{\sqrt {a}}\right )}{a^{3/2}}+\frac {b (a+b) \coth (c+d x)}{a \left (a+b \coth ^2(c+d x)\right )}-\log (1-\coth (c+d x))+\log (1+\coth (c+d x))}{2 (a+b)^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.92, size = 103, normalized size = 1.16
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\coth \left (d x +c \right )+1\right )}{2 \left (a +b \right )^{2}}-\frac {\ln \left (\coth \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{2}}+\frac {b \left (\frac {\left (a +b \right ) \coth \left (d x +c \right )}{2 a \left (a +b \left (\coth ^{2}\left (d x +c \right )\right )\right )}+\frac {\left (3 a +b \right ) \arctan \left (\frac {b \coth \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}\right )}{\left (a +b \right )^{2}}}{d}\) | \(103\) |
default | \(\frac {\frac {\ln \left (\coth \left (d x +c \right )+1\right )}{2 \left (a +b \right )^{2}}-\frac {\ln \left (\coth \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{2}}+\frac {b \left (\frac {\left (a +b \right ) \coth \left (d x +c \right )}{2 a \left (a +b \left (\coth ^{2}\left (d x +c \right )\right )\right )}+\frac {\left (3 a +b \right ) \arctan \left (\frac {b \coth \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}\right )}{\left (a +b \right )^{2}}}{d}\) | \(103\) |
risch | \(\frac {x}{a^{2}+2 a b +b^{2}}+\frac {b \left (a \,{\mathrm e}^{2 d x +2 c}-b \,{\mathrm e}^{2 d x +2 c}-a -b \right )}{d a \left (a +b \right )^{2} \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}-2 a \,{\mathrm e}^{2 d x +2 c}+2 b \,{\mathrm e}^{2 d x +2 c}+a +b \right )}+\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {a +2 \sqrt {-a b}-b}{a +b}\right )}{4 a \left (a +b \right )^{2} d}+\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {a +2 \sqrt {-a b}-b}{a +b}\right ) b}{4 a^{2} \left (a +b \right )^{2} d}-\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a b}-a +b}{a +b}\right )}{4 a \left (a +b \right )^{2} d}-\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a b}-a +b}{a +b}\right ) b}{4 a^{2} \left (a +b \right )^{2} d}\) | \(311\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 207 vs.
\(2 (77) = 154\).
time = 0.52, size = 207, normalized size = 2.33 \begin {gather*} \frac {{\left (3 \, a b + b^{2}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} - a + b}{2 \, \sqrt {a b}}\right )}{2 \, {\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} \sqrt {a b} d} + \frac {a b + b^{2} - {\left (a b - b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{{\left (a^{4} + 3 \, a^{3} b + 3 \, a^{2} b^{2} + a b^{3} - 2 \, {\left (a^{4} + a^{3} b - a^{2} b^{2} - a b^{3}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (a^{4} + 3 \, a^{3} b + 3 \, a^{2} b^{2} + a b^{3}\right )} e^{\left (-4 \, d x - 4 \, c\right )}\right )} d} + \frac {d x + c}{{\left (a^{2} + 2 \, a b + b^{2}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 814 vs.
\(2 (77) = 154\).
time = 0.44, size = 1952, normalized size = 21.93 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 198 vs.
\(2 (77) = 154\).
time = 0.41, size = 198, normalized size = 2.22 \begin {gather*} -\frac {\frac {{\left (3 \, a b + b^{2}\right )} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} - a + b}{2 \, \sqrt {a b}}\right )}{{\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} \sqrt {a b}} - \frac {2 \, {\left (d x + c\right )}}{a^{2} + 2 \, a b + b^{2}} - \frac {2 \, {\left (a b e^{\left (2 \, d x + 2 \, c\right )} - b^{2} e^{\left (2 \, d x + 2 \, c\right )} - a b - b^{2}\right )}}{{\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} {\left (a e^{\left (4 \, d x + 4 \, c\right )} + b e^{\left (4 \, d x + 4 \, c\right )} - 2 \, a e^{\left (2 \, d x + 2 \, c\right )} + 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.58, size = 110, normalized size = 1.24 \begin {gather*} \frac {\frac {a\,x}{{\left (a+b\right )}^2}+\frac {b\,x\,{\mathrm {coth}\left (c+d\,x\right )}^2}{{\left (a+b\right )}^2}+\frac {b\,\mathrm {coth}\left (c+d\,x\right )}{2\,a\,d\,\left (a+b\right )}}{b\,{\mathrm {coth}\left (c+d\,x\right )}^2+a}+\frac {\mathrm {atan}\left (\frac {b\,\mathrm {coth}\left (c+d\,x\right )}{\sqrt {a\,b}}\right )\,\left (b^2+3\,a\,b\right )}{\sqrt {a\,b}\,\left (2\,a^3\,d+a\,b\,\left (4\,a\,d+2\,b\,d\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________